import echarts from "echarts";
export default class echartsOption {
    constructor() {
        this.option = {
            xAxis: {
                type: 'category',
                data: ["本月新增人数", "今日新增人数"]
            },
            yAxis: {
                type: 'value',
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: ['#ebebeb'],
                        type: "dashed"
                    }
                },
            },
            grid: {
                top: 20,
                bottom: 30

            },
            series: [{
                data: [],
                type: 'bar',
                label: {
                    show: true,
                    position: 'top',
                    formatter: "{c}人"  
                },
                itemStyle:{
                    color:"#E63038"
                },
                barWidth:30
            }]
        }
    }
    setContentData(data) {
        this.option.series[0].data = data
    }
}